package com.geek.javase.ch04.test2;

/*
 *@author wangpeng
 *2025/10/12 21:04
 *@description TODO
 */
public class Employee extends Person implements Add{
    //属性
    private String ID;
    private double wage;
    private int workAge;
    //重写接口的方法
    @Override
    public void add() {
        System.out.println("Employee涨工资前:"+this.wage);
        this.wage = this.wage * 1.1;
        System.out.println("Employee涨工资后:"+this.wage);
    }

    //无参构造
    public Employee() {
    }
    //有参构造
    public Employee(String name, String address, String ID, double wage, int workAge) {
        super(name, address);
        this.ID = ID;
        this.wage = wage;
        this.workAge = workAge;
    }

    public Employee(String ID, double wage, int workAge) {
        this.ID = ID;
        this.wage = wage;
        this.workAge = workAge;
    }

    public String getID() {
        return ID;
    }

    public double getWage() {
        return wage;
    }

    public int getWorkAge() {
        return workAge;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public void setWage(double wage) {
        this.wage = wage;
    }

    public void setWorkAge(int workAge) {
        this.workAge = workAge;
    }
    //重写该类toString()方法；　
    @Override
    public String toString() {
        return "Employee{" +
                "ID='" + ID + '\'' +
                ", wage=" + wage +
                ", workAge=" + workAge +
                '}';
    }
}
